package java67_adv4;

import java.util.Arrays;

public class ArrTest {

	public static void main(String[] args) {
		int[] ar = { 3, 5, 2, 111, 14, 15, 2345, 444 };
		System.out.println(Arrays.toString(ar));
		int ar2[] = new int[100];
		Arrays.fill(ar2, 5);
		System.out.println(Arrays.toString(ar2));
		int[] a3 = Arrays.copyOf(ar, 40);
		System.out.println(Arrays.toString(a3));
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>");
		System.out.println(Arrays.equals(ar, a3));// max,min
		Arrays.sort(a3);
		System.out.println(Arrays.toString(a3));
		System.out.println(">>>>>>>>>>>>>>>>>对象数组---->");
		Student st[] = { new Student(1002, "老吴", 52, 176.5F), new Student(1000, "老送", 32, 176.5F),
				new Student(1005, "刘二", 32, 156.5F), new Student(1023, "老马", 32, 16576.5F),
				new Student(1006, "六三", 32, 19.5F), new Student(1056, "小刘", 32, 146.5F) };
		System.out.println("排序前:");
		System.out.println(Arrays.toString(st));
		Arrays.sort(st);
		System.out.println("排序后:");
		System.out.println(Arrays.toString(st));
	}

}
